<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>小米商品展示</title>
    <style>
      body {
        font: 14px/1.5 'Helvetica Neue', 'Helvetica', 'Arial', 'Microsoft Yahei', 'Hiragino Sans GB', 'Heiti SC',
          'WenQuanYi Micro Hei', 'sans-serif';
        background-color: #ccc;
      }

      .container {
        width: 1365px;
      }

      .left-box {
        float: left;
        margin-right: 15px;
      }

      .right-box {
        float: left;
        width: 1116px;
        height: 615px;
      }
      .product {
        float: left;
        width: 234px;
        height: 300px;
        background-color: #fff;
        text-align: center;
        margin-right: 15px;
        margin-bottom: 15px;
        transition: transform 0.3s linear; /* 过渡效果 */
      }

      .product:hover {
        box-shadow: 5px 5px 5px #acaaaa;
        transform: translateY(-3px); /* 元素位移 */
      }

      .product img {
        width: 160px;
        padding-top: 20px;
      }

      .product .title {
        margin: 0 auto;
      }

      .product .desc {
        font-size: 12px;
        color: #ccc;
        margin: 5px 15px;

        /* 内容不换行 */
        white-space: nowrap;

        /* 
          溢出文本控制 
          visible     默认值,文本溢出
          hidden      溢出部分隐藏
          scroll      产生滚动条
          auto        自动,如果有溢出则产生滚动条,如果没有溢出则正常显示
        */
        overflow: hidden;

        /* 溢出文本的提示方式,ellipsis表示省略号 */
        text-overflow: ellipsis;
      }

      .product .price {
        font-size: 12px;
        color: #ff6a00;
      }

      .product .price span {
        color: #ccc;
        text-decoration: line-through;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="left-box">
        <img src="../img/left-phone.webp" />
      </div>
      <div class="right-box">
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
        <div class="product">
          <img src="../img/pods.webp" alt="" />
          <p class="title">Redmi Buds 5</p>
          <p class="desc">46dB深度降噪丨12.4mm镀钛动圈丨40小时超长续航</p>
          <p class="price">199元起&nbsp;&nbsp;&nbsp;<span>299元</span></p>
        </div>
      </div>
    </div>
  </body>
</html>
